<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    // var bar = function () {
    //     console.log("bar_called", this)
    // }
    //
    // var foo = () => {
    //     console.log("foo_called", this)
    // }
    //
    // bar();
    // foo();
    //

    var obj = {
        name: "obj",
        foo: function () {
            var bar = () => {
                console.log("bar_called",this)
            }
            return bar;
        }
    }

    var fn = obj.foo()
    fn.apply("aaa")


</script>

</body>
</html>